.class Lcom/estrongs/android/pop/app/PopVideoPlayer$u;
.super Ljava/lang/Object;
.source "PopVideoPlayer.java"

# interfaces
.implements Landroid/widget/MediaController$MediaPlayerControl;
.implements Lcom/estrongs/chromecast/CastDeviceListener;
.implements Lcom/estrongs/chromecast/ChromeCastConnectionListener;
.implements Lcom/estrongs/chromecast/RemoteMediaPlayerListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/estrongs/android/pop/app/PopVideoPlayer;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "u"
.end annotation


# instance fields
.field private a:Z

.field final synthetic b:Lcom/estrongs/android/pop/app/PopVideoPlayer;


# direct methods
.method constructor <init>(Lcom/estrongs/android/pop/app/PopVideoPlayer;)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 p1, 0x0

    .line 2
    iput-boolean p1, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->a:Z

    return-void
.end method


# virtual methods
.method public a()Z
    .locals 1

    .line 1
    iget-boolean v0, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->a:Z

    return v0
.end method

.method public canPause()Z
    .locals 1

    const/4 v0, 0x1

    return v0
.end method

.method public canSeekBackward()Z
    .locals 1

    const/4 v0, 0x1

    return v0
.end method

.method public canSeekForward()Z
    .locals 1

    const/4 v0, 0x1

    return v0
.end method

.method public getAudioSessionId()I
    .locals 1

    const/4 v0, 0x0

    return v0
.end method

.method public getBufferPercentage()I
    .locals 1

    const/4 v0, 0x0

    return v0
.end method

.method public getCurrentPosition()I
    .locals 2

    const/4 v0, 0x1

    .line 1
    iput-boolean v0, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->a:Z

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-static {v0}, Lcom/estrongs/android/pop/app/PopVideoPlayer;->l(Lcom/estrongs/android/pop/app/PopVideoPlayer;)Lcom/estrongs/chromecast/ChromeCastManager;

    move-result-object v0

    invoke-virtual {v0}, Lcom/estrongs/chromecast/ChromeCastManager;->getMediaStreamPosition()J

    move-result-wide v0

    long-to-int v1, v0

    return v1
.end method

.method public getDuration()I
    .locals 2

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-static {v0}, Lcom/estrongs/android/pop/app/PopVideoPlayer;->l(Lcom/estrongs/android/pop/app/PopVideoPlayer;)Lcom/estrongs/chromecast/ChromeCastManager;

    move-result-object v0

    invoke-virtual {v0}, Lcom/estrongs/chromecast/ChromeCastManager;->getMediaStreamDuration()J

    move-result-wide v0

    long-to-int v1, v0

    return v1
.end method

.method public isPlaying()Z
    .locals 4

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-static {v0}, Lcom/estrongs/android/pop/app/PopVideoPlayer;->l(Lcom/estrongs/android/pop/app/PopVideoPlayer;)Lcom/estrongs/chromecast/ChromeCastManager;

    move-result-object v0

    invoke-virtual {v0}, Lcom/estrongs/chromecast/ChromeCastManager;->getMediaPlayerState()I

    move-result v0

    const/4 v1, 0x1

    const/4 v2, 0x0

    if-lez v0, :cond_0

    iget-object v0, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    .line 2
    invoke-static {v0}, Lcom/estrongs/android/pop/app/PopVideoPlayer;->l(Lcom/estrongs/android/pop/app/PopVideoPlayer;)Lcom/estrongs/chromecast/ChromeCastManager;

    move-result-object v0

    invoke-virtual {v0}, Lcom/estrongs/chromecast/ChromeCastManager;->getMediaPlayerState()I

    move-result v0

    if-eq v0, v1, :cond_0

    iget-object v0, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    .line 3
    invoke-static {v0}, Lcom/estrongs/android/pop/app/PopVideoPlayer;->l(Lcom/estrongs/android/pop/app/PopVideoPlayer;)Lcom/estrongs/chromecast/ChromeCastManager;

    move-result-object v0

    invoke-virtual {v0}, Lcom/estrongs/chromecast/ChromeCastManager;->getMediaPlayerState()I

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    .line 4
    invoke-static {v0}, Lcom/estrongs/android/pop/app/PopVideoPlayer;->l(Lcom/estrongs/android/pop/app/PopVideoPlayer;)Lcom/estrongs/chromecast/ChromeCastManager;

    move-result-object v0

    invoke-virtual {v0}, Lcom/estrongs/chromecast/ChromeCastManager;->getMediaPlayerState()I

    move-result v0

    const/4 v3, 0x3

    if-eq v0, v3, :cond_0

    goto :goto_0

    :cond_0
    const/4 v1, 0x0

    :goto_0
    if-nez v1, :cond_1

    .line 5
    iput-boolean v2, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->a:Z

    :cond_1
    return v1
.end method

.method public onConnected()V
    .locals 0

    return-void
.end method

.method public onConnectionFailed()V
    .locals 0

    return-void
.end method

.method public onConnectionSuspended()V
    .locals 0

    return-void
.end method

.method public onDeviceAdded(Lcom/estrongs/chromecast/CastDeviceInfo;)V
    .locals 0

    return-void
.end method

.method public onDeviceRemoved(Lcom/estrongs/chromecast/CastDeviceInfo;)V
    .locals 0

    return-void
.end method

.method public onDeviceSelected(Lcom/estrongs/chromecast/CastDeviceInfo;)V
    .locals 0

    return-void
.end method

.method public onDeviceUnSelected(Lcom/estrongs/chromecast/CastDeviceInfo;)V
    .locals 0

    .line 1
    iget-object p1, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-virtual {p1}, Landroid/app/Activity;->isFinishing()Z

    move-result p1

    if-nez p1, :cond_0

    .line 2
    iget-object p1, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-static {p1}, Lcom/estrongs/android/pop/app/PopVideoPlayer;->o(Lcom/estrongs/android/pop/app/PopVideoPlayer;)V

    :cond_0
    return-void
.end method

.method public onDeviceVolumeChanged(Lcom/estrongs/chromecast/CastDeviceInfo;)V
    .locals 0

    return-void
.end method

.method public onDisconnected()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-virtual {v0}, Landroid/app/Activity;->isFinishing()Z

    move-result v0

    if-nez v0, :cond_0

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-static {v0}, Lcom/estrongs/android/pop/app/PopVideoPlayer;->o(Lcom/estrongs/android/pop/app/PopVideoPlayer;)V

    .line 3
    :cond_0
    iget-object v0, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-static {v0}, Lcom/estrongs/android/pop/app/PopVideoPlayer;->l(Lcom/estrongs/android/pop/app/PopVideoPlayer;)Lcom/estrongs/chromecast/ChromeCastManager;

    move-result-object v0

    invoke-virtual {v0}, Lcom/estrongs/chromecast/ChromeCastManager;->clearCacheFiles()V

    return-void
.end method

.method public onStatusUpdated(I)V
    .locals 5

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-static {v0}, Lcom/estrongs/android/pop/app/PopVideoPlayer;->v(Lcom/estrongs/android/pop/app/PopVideoPlayer;)I

    move-result v0

    const/4 v1, 0x1

    if-ne v0, v1, :cond_5

    const/16 v0, 0x8

    const/4 v2, 0x0

    if-eqz p1, :cond_0

    if-eq p1, v1, :cond_0

    const/4 v3, 0x4

    if-eq p1, v3, :cond_0

    const/16 v3, 0x3e8

    if-eq p1, v3, :cond_0

    .line 2
    iget-object v3, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-static {v3}, Lcom/estrongs/android/pop/app/PopVideoPlayer;->A(Lcom/estrongs/android/pop/app/PopVideoPlayer;)Landroid/view/View;

    move-result-object v3

    invoke-virtual {v3, v0}, Landroid/view/View;->setVisibility(I)V

    goto :goto_0

    .line 3
    :cond_0
    iget-object v3, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-static {v3}, Lcom/estrongs/android/pop/app/PopVideoPlayer;->A(Lcom/estrongs/android/pop/app/PopVideoPlayer;)Landroid/view/View;

    move-result-object v3

    invoke-virtual {v3, v2}, Landroid/view/View;->setVisibility(I)V

    .line 4
    :goto_0
    iget-object v3, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-static {v3, v1}, Lcom/estrongs/android/pop/app/PopVideoPlayer;->b(Lcom/estrongs/android/pop/app/PopVideoPlayer;Z)Z

    .line 5
    iget-object v3, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-static {v3}, Lcom/estrongs/android/pop/app/PopVideoPlayer;->d(Lcom/estrongs/android/pop/app/PopVideoPlayer;)V

    const/16 v3, -0x3e9

    if-ne p1, v3, :cond_1

    .line 6
    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object v3

    const v4, 0x7f110a41

    invoke-static {v3, v4, v1}, Lcom/estrongs/android/ui/view/d;->a(Landroid/content/Context;II)V

    goto :goto_1

    :cond_1
    const/16 v3, -0x3e8

    if-ne p1, v3, :cond_2

    .line 7
    invoke-static {}, Lcom/estrongs/android/pop/FexApplication;->n()Lcom/estrongs/android/pop/FexApplication;

    move-result-object v3

    const v4, 0x7f110770

    invoke-static {v3, v4, v1}, Lcom/estrongs/android/ui/view/d;->a(Landroid/content/Context;II)V

    :cond_2
    :goto_1
    if-ne p1, v1, :cond_4

    .line 8
    iget-object v3, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-static {v3}, Lcom/estrongs/android/pop/app/PopVideoPlayer;->l(Lcom/estrongs/android/pop/app/PopVideoPlayer;)Lcom/estrongs/chromecast/ChromeCastManager;

    move-result-object v3

    invoke-virtual {v3}, Lcom/estrongs/chromecast/ChromeCastManager;->getMediaIdleReason()I

    move-result v3

    if-ne v3, v1, :cond_4

    .line 9
    iget-object v1, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-virtual {v1}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;

    move-result-object v1

    const-string v3, "Chromecast"

    invoke-virtual {v1, v3, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z

    move-result v1

    if-eqz v1, :cond_3

    .line 10
    iget-object v1, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-virtual {v1}, Landroid/app/Activity;->finish()V

    .line 11
    :cond_3
    iget-object v1, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-static {v1}, Lcom/estrongs/android/pop/app/PopVideoPlayer;->A(Lcom/estrongs/android/pop/app/PopVideoPlayer;)Landroid/view/View;

    move-result-object v1

    invoke-virtual {v1, v0}, Landroid/view/View;->setVisibility(I)V

    .line 12
    iget-object v0, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-static {v0, v2}, Lcom/estrongs/android/pop/app/PopVideoPlayer;->b(Lcom/estrongs/android/pop/app/PopVideoPlayer;Z)Z

    :cond_4
    if-gez p1, :cond_5

    .line 13
    iget-object p1, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-static {p1, v2}, Lcom/estrongs/android/pop/app/PopVideoPlayer;->b(Lcom/estrongs/android/pop/app/PopVideoPlayer;Z)Z

    :cond_5
    return-void
.end method

.method public pause()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-static {v0}, Lcom/estrongs/android/pop/app/PopVideoPlayer;->l(Lcom/estrongs/android/pop/app/PopVideoPlayer;)Lcom/estrongs/chromecast/ChromeCastManager;

    move-result-object v0

    invoke-virtual {v0}, Lcom/estrongs/chromecast/ChromeCastManager;->mediaPause()V

    return-void
.end method

.method public seekTo(I)V
    .locals 3

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-static {v0}, Lcom/estrongs/android/pop/app/PopVideoPlayer;->l(Lcom/estrongs/android/pop/app/PopVideoPlayer;)Lcom/estrongs/chromecast/ChromeCastManager;

    move-result-object v0

    int-to-long v1, p1

    invoke-virtual {v0, v1, v2}, Lcom/estrongs/chromecast/ChromeCastManager;->mediaSeek(J)V

    return-void
.end method

.method public start()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/PopVideoPlayer$u;->b:Lcom/estrongs/android/pop/app/PopVideoPlayer;

    invoke-static {v0}, Lcom/estrongs/android/pop/app/PopVideoPlayer;->l(Lcom/estrongs/android/pop/app/PopVideoPlayer;)Lcom/estrongs/chromecast/ChromeCastManager;

    move-result-object v0

    invoke-virtual {v0}, Lcom/estrongs/chromecast/ChromeCastManager;->mediaPlay()V

    return-void
.end method
